Method for dynamic range editing

ABSTRACT

A method of displaying a high dynamic range image, comprising receiving the high dynamic range image, calculating a first set of tone mapping parameters as a function of the high dynamic range image, sub-sampling the first set of tone mapping parameters at a first resolution to create a first sub-sampled parameter set, creating a first tone-mapped image by processing the high dynamic range image as a function of the first sub-sampled parameter set, and displaying the first tone-mapped image. A method of composting a plurality of versions of an image to create the high dynamic range image is also disclosed such that the compositing may be modified as a function of received user input.

CROSS-REFERENCE TO RELATED APPLICATION

Priority is claimed under 35 U.S.C. §119(e) to U.S. Provisional PatentApplication No. 60/867,080, filed on Nov. 22, 2006, entitled “DynamicRange Editing” by Nils Kokemohr, which application is incorporated byreference herein.

BACKGROUND

At the current time, the term “HDR imaging” is used forphotography-based 3D rendering and for capturing HDR 32 bit images. Wewill here only focus on the latter. Such HDR-32 bit (sometimes 16 bit)images are created using a tripod and a camera that is operated in“bracketing” mode, so that a series of 2 to 15 images of differentexposures is recorded. These images are merged in memory to one single32 bit image, which then has a very high dynamic range. However, such a32 bit image can not be displayed conveniently on any monitor or printer(yet). Therefore, a so-called “tone mapping” function is required toconvert 32 bit images into an adapted, displayable 8 bit or 16 bit file.

Some of such tone mappings are given in Michael Ashikhmin, “A ToneMapping Algorithm for High Contrast Images,” in 13th EurographicsWorkshop on Rendering. Eurographics, 2002, [Ash02]; Gregory Ward Larson,Holy Rushmeier, Christine Piatko, “A visibility matching tonereproduction operator for high dynamic range scenes,” in IEEETransactions on Visualization and Computer Graphics, 1997 [Ward97]; ErikReinhard, Michael Stark, Peter Shirley, James Ferwerda, “PhotographicTone Reproduction for Digital Images,” in Proceedings of ACM SIGGRAPH2002, Computer Graphics Proceedings, Annual Conference Series. ACMPress/ACM SIGGRAPH, July 2002 [Rein02]. It should be said that the overtwo decades old “retinex” routine can also be considered the “mother” ofall tone mappings (although not specifically designed for HDR imaging),which can be represented in simplified form as:J=qI/(i*g)where g is a convolution kernel function, such as a Gaussian bell curve,q is any factor such as 128.0, and “*” represents 2D signal convolution.In other words: J_(xy) is bright if I_(xy) is bright compared to theadjacent pixels within an area of influence defined by g.

This tone-mapping is currently at the state of the art poorly integratedinto the workflow. What is needed is a method to enhance the HDRworkflow, enhance the speed and ease of tone mapping, while enhancingthe results and the convenience of editing for the user. Preferably,this would allow for fast previews of tone-maps, and allow editing ofthe image before the tone-map is applied. The invention disclosed hereinwill be called “DRE”, which stands for Dynamic Range Editing.

SUMMARY

Disclosed is a method to process a tone-compressed image out of originaldata with a high dynamic range, intermediate data representingparameters for an image conversion, and user data, where saidintermediate data are calculated at a low resolution.

Intermediate data may be first calculated at a low resolution in orderto display a first resulting image on the screen, and then saidintermediate data is processed at a second, finer resolution forrefining the quality of the resulting image on the screen.

Also disclosed is a method to edit HDR data, where the user can provideselective input targeting a region in an image, comprising displaying atone-mapped image on the screen, allowing the user to provide hisdesires for local changes of the tone mapping, and updating thetone-mapped image on the screen. The data may represent the desires ofthe user of local changes of tone mapping refined as a function of theoriginal high dynamic range data.

Also disclosed is a method for tone-mapping, comprising keeping the HDRdata in memory, keeping user input data in memory, keeping matricesresulting of the HDR data and the user input in memory, processing theHDR data and the matrices to obtain a tone-mapped image, and displayingthe tone-mapped image on the screen. The HDR data and user input datacan be stored to a hard drive.

Also disclosed is a method to process a tone-mapped image out of aseries of differently exposed images, where different weights areassigned to each pixel in each image within the series, where highweights represent how well the pixel data is suitable to contribute tothe resulting image, and a user interface is embedded, allowing a userto assign high weights to desired details of individual images withinthe series, and allowing a user to assign low or zero weights toundesired details of individual images within the series.

Also disclosed is a method to process a tone-mapped image out of aseries of differently exposed and potentially unaligned images,comprising an image registration process applied to the series of imagesto align the images, where weights are used for an image responsefunction calculation, so that an area of pixels can be used to calculatea final result that is larger than the area where all images areoverlaid.

A method of displaying a high dynamic range image is disclosedcomprising receiving the high dynamic range image; calculating a firstset of tone mapping parameters as a function of the high dynamic rangeimage; sub-sampling the first set of tone mapping parameters at a firstresolution to create a first sub-sampled parameter set; creating a firsttone-mapped image by processing the high dynamic range image as afunction of the first sub-sampled parameter set; and displaying thefirst tone-mapped image.

In a further embodiment, after the display of the first tone-mappedimage, sub-sampling of the first set of tone mapping parameters is doneat a second resolution to create a second sub-sampled parameter set, asecond tone-mapped image is created by processing the high dynamic rangeimage as a function of the second sub-sampled parameter set, and thesecond tone-mapped image is displayed. This may be repeated.

Prior to the sub-sampling step, a second set of tone mapping parametersmay be received from a user, and the sub-sampling step then comprisessub-sampling both the first and second sets of tone mapping parametersat the first resolution to create the first sub-sampled parameter set.

The second set of parameters may be, e.g., a region selection, brushstroke information, image reference points, image reference regions,color temperature adjustments or local brightness change information.

The first set of parameters may be, e.g., a matrix of convolution radii,or an adaptation light intensity matrix. The first set of parameters maycorrespond to a sub-set of the high dynamic range image.

A method of composting and display of a plurality of versions of animage is disclosed comprising receiving the plurality of versions of theimage; registering the plurality of versions; compositing the registeredplurality of versions to create a high dynamic image; displaying thehigh dynamic image (including using the steps disclosed herein for suchdisplay); and providing a user interface to receive user input such thatthe compositing of the registered plurality of versions may be modifiedas a function of the received user input. The user input might be, e.g.,selection of detail from one or more of the plurality of versions, or anassignment of weighting factors. The compositing step may comprisepadding of one or more of the registered plurality of versions.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram which shows the relation of the matrixes I, P, Jrepresenting original data with a high dynamic range, intermediate datarepresenting parameters for an image conversion, and a final tone mappedimage.

FIG. 2 shows the matrixes of FIG. 1, where a sub-sampled parametermatrix P is illustrated.

FIG. 3 comprises four images. FIG. 3.1 represents a matrix I containingunmapped HDR data. FIG. 3.2 shows an image J derived from I using aroutine where a full resolution matrix P was used. FIG. 3.3 shows animage J derived from I using a routine of the invention, where P wassub-sampled to a very low resolution. FIG. 3.4 shows an image J derivedfrom I using a routine where all matrixes J, P, and I were kept at a lowresolution.

FIG. 4 shows an overview of one embodiment of the invention, featuringsets of matrixes C, U and P.

FIG. 5 represents in an abbreviated graphical form the desired HDRconversion details that the user might communicate to the disclosedsystem in a further embodiment. As shown, there are general HDRconversion parameters that the user may chose for the whole image, andthere are local HDR conversion parameters provided to the system.

FIG. 6 displays a graphical user interface of how one embodiment of theinvention can look like, featuring brushes with which the user can takeinfluence on the HDR conversion parameters.

FIG. 7 displays different matrices. FIG. 7.1 represents a (un-mapped)HDR image, id est where no details were adapted to the dynamic range ofa computer screen or printer. FIG. 7.2 shows an image as it could resultfrom an HDR tone mapping process, and FIG. 7.3 shows such a tone-mappedimage where the user has taken some selective control over the tonemapping process. FIG. 7.4 represents two matrices as they may occur inC, FIG. 7.5 may represent the matrix U, and FIG. 7.6 may represent thematrix P. The user input is represented in matrix U, FIG. 7.5, which hasinfluenced the matrix P, shown in FIG. 7.6.

FIG. 8 shows how a poor image registration might not match two details,leading to some sort of “double vision” effect in J. Here the user canplace two marks on the details to communicate to the system what objectsneed to be overlaid.

FIG. 9 illustrates a system where the user can take influence over imagedetails.

FIG. 10 shows a series of registered images, and the method of paddingand weighting to maximize image area.

FIG. 11.1 shows how a result would look without the weighting systemintroduced in this disclosure, and 11.2 shows how the total image areacan increase if said weighting system is implemented.

FIG. 12 illustrates a hard drive, a system memory, and a display deviceimplementing one embodiment of the invention.

DETAILED DESCRIPTION

Tone Mapping is a process of taking a HDR image with a high dynamicrange and with typically 16 bit or 32 bit, and converting such an imageinto an image that has contrast that was optimally adjusted for thescreen or for a printer. The simplest class is called monotonic tonemapping, defined asJ _(xy) =t(I _(xy))  [Equation 01]In Equation 1, J is the tone mapped image, i.e., the image the contrastof which as adjusted for screen or print, I is the original HDR image,and t is a function that is strictly monotonic increasing. This meansthat if pixel J_(xy) is darker than pixel J_(x′y′) in the contrastadjusted image, the piece of surface in the original scenariocorresponding to (x, y) was also darker than the piece of surfacecorresponding to (x′, y′). Hence, the name monotonic.

A preferred class of tone mapping functions, called adaptive tonemappings, isJ _(xy) =t(I,x,y)  [Equation 02]

As it can be seen, t is dependent from I and the current location, sothat the contrast change of a pixel can be dependent on the surroundingimage structure. This is done to lighten up structures in dark areasmore than structures in bright areas. Imagine a person photographedagainst a bright sky, then all pixels in the face in I will be darkerthan most pixels in the sky in I. However, if t is adaptive, some pixelsin the face in J may be brighter than some pixels in the sky in J. Thisenables better viewing. However, local contrast should be kept, so thatJ_(xy)>J_(x′y′)→I_(xy)>I_(x′y′) if (x,y) is spatially close to (x′, y′).This condition is called “locally monotonic mapping”, and while thiscondition may be violated in a small percentage of pixels in an image,it is an important condition to ensure that the resulting image containsmeaningful details.

General Form of Tone Mapping

A general equation for tone mapping can be given asJ _(xy) =t(I,x,y,P _(xy1) ,P _(xy2) . . . P _(xyn))  [Equation 03]

P_(xyn) are N different local parameters. For instance, Ashikminsuggests a tone mapping that is based upon a kernel of variable size,where the size of the kernel is based upon the local image contrast(parameter “s” in [Ash02]). This can be written as:J _(xy) =t(I,x,y,s _(xy))  [Equation 04]

where s is the radius of the convolution kernel used at the location x,y. Alternatively, this can be written as:J _(xy) =t(I,x,y,P _(xy))  [Equation 05]

where P is a matrix that resulted in convolving I with a variableradius. Note that [Ahs02] processes P not by processing differentconvolution radii for every pixel, but by blending differently convolvedimages into one another based on a local parameter, which results in thesame effect.

There is a major difference between Equations 04 and 05: To computet(I,x,y,s_(xy)) with given parameters, a kernel needs to be convolvedwith I at every location (x,y), but computing J_(xy)=t(I,x,y,P_(xy)),where the matrix P is provided as an input parameter, will require muchless computing power, once P is given. This is an important observation,since tone mapping is a computational time-intense process.

In the following sections we will disclose how to enhance the process ofconverting a matrix I of HDR data into an enhanced resulting image J. Inthe following sections we'll introduce some general forms of thealgorithms first for a better understanding, and then fill in additionalvariations later and point out where the advantages of the suggestedalgorithms lie.

Equation 05 would translate into the following algorithm:

10 Receive HDR image I, so that min(I) = 0.0 and max(I) = 1.0 20 Reservesome memory for P₁, P₂, . . . 30 Calculate P₁, P₂, ... based on data inI 40 set J = t(I,P₁, P₂, ...) [routine 01]

Approaching a HDR conversion in this sense provides an attack point foran acceleration. As said earlier, computing P out of I (for instance byapplying a convolution kernel on I, or a local contrast detection on I)may be computing intense and calculating J in line 40 may be a lotfaster, depending on the actual HDR conversion.

One way of accelerating the procedure is to calculate P (when we say Pwe mean P₁, P₂, P₃, . . .) at a lower resolution, e.g., sub-sampling theP matrix. If I and J have dimensions of 1000×1000 pixels, P might besub-sampled to a resolution of 100×100 pixels. Then the function t inline 40 would need to up-scale P to a size of 1000×1000 pixels forcalculating J out of I and P. However, this is a non-time-consumingprocess, particularly if a nearest-neighbor interpolation is used.

FIG. 1 shows the relation of the matrixes I, P, J mentioned in [routine1] and [equation 5]. FIG. 2 shows the same matrixes where a lowerresolution of P is illustrated.

FIG. 3 shows four images: FIG. 3.1 represents a matrix I containingunmapped HDR data. FIG. 3.2 shows an image J derived from I using aroutine as in [routine 01] where a full resolution matrix P was used.FIG. 3.3 shows an image J derived from I using a routine like routine01, where P was used at a very low resolution. FIG. 3.4 shows an image Jderived from I using a routine like routine 01 where all matrixes J, P,and I were kept at a low resolution.

As it can be seen by comparing FIG. 3.3 and FIG. 3.4, downsizing only Pleads to much less loss in quality than downsizing all data I. Ofcourse, FIG. 3.3 and FIG. 3.4 are exaggerated; in the real world, theblocking should be much less visible.

A method embodying this technique comprises starting a processing threadby calculating P at a very low resolution, and then allowing for fastdisplay of the image, so that the user can see a result very quickly.When the thread is finished calculating P at a very low resolution,another thread can be started to calculate P at a finer resolution andso forth until P is calculated at a sufficiently high resolution. Thisallows for a conversion that is extremely responsive, where the usersees first results extremely quickly and where calculating the fullresolution image will take place shortly later.

Flexible Tone Mappings

This can be extended to a system where the user can influence the tonemapping locally. Local adjustment of tone mapping is feasible using theinvention disclosed since we have a system that allows for a speedyfeedback of changes to the user via a quick preview.

FIG. 4 shows an overview over such an enhanced workflow, featuring setsof matrixes C, U and P. Note that when we say P, we always refer to aset of matrices P₁, P₂, P₃ . . . , same for C and U. Each set ofmatrices can consist of one or more matrices.

In FIG. 4, I refers to the HDR data, C refers to data derived from theimage I, such as a I convolved with a kernel, a calculated convolutionkernel radius, wavelet coefficients, an edge-detection and the like. Zrefers to data that the user has input. This can be for instance brushstroke information, such as

Z = [ radius = 19.3, effect = -3, (x1,y1) = (400,300), (x2,y2) =(420,295), (x3,y3) = (430,305), (x4,y4) = (415,320), (x5,y5) =(390,340)  ]

Note: The variable “effect” is described later in this disclosure.Please note also that depending on the implementation, the brush strokereceiving routine may be implemented in a way that produces a matrix ofdata instead of single brush stroke coordinates.

Also, please note that Z may contain other selective user input, such asa gradient effect, a “magic wand” selection connected with an effect, anIRP or an IRR (with reference to U.S. Pat. Nos. 7,031,547, 6,865,300,and 6,728,421, which are incorporated herein).

As it can be seen in FIG. 4, U (id est: U₁, U₂ . . .) is derived bothfrom Z and from I. This is one aspect of this invention. This isexplained in the following sections. First, to define U: U is a matrixor matrices that contain adapted data based on a user input and adaptedto the image, providing information to succeeding algorithms on what theuser wants where to which intensity on a pixel-by-pixel-basis.

For instance, assume that in an image containing a sky a user has drawna brush stroke extending from the top left to the top right. Then Zcontains the brush stroke coordinates, I contains HDR data representingan image with said sky, and U could be calculated as follows:

 10 detect edges in I  20 define R = matrix of zeroes  30 set pixels atthe coordinates provided in Z to 1.0 in R  40 find all pixelsneighboring values of 1.0 in R, store those in R′  50 delete thosepixels in R′ corresponding to a detected edge of I (see line 10)  60 addremaining pixels in R′ to R  70 if (R′ = nil) goto 100  80 define R′ =nil  90 go to 60 100 set U = j * R; [routine 02]

In other words, routine 02 finds a matrix of pixels U that contain avalue of j for all those pixels in I (respectively J) where the userappears to desire a certain effect.

Note that the advantage in routine 02 is that the data Z are adapted tothe image using HDR values of I. Remember that HDR values have a veryhigh dynamic range. So for instance, imagine an image containing (a)shadows, (b) dark objects, (c) bright objects, (d) a bright sky, (e)white clouds, and (f) a light source. Then I will due to its nature showstrong luminance differences between a and b, b and c, c and d, d and eand e and f. In a tone-mapped/compressed image J, these differencescannot be present to the same extent due to the nature oftone-compressed images. Therefore the data in I will be much moresuitable to be used for an adaptive routine like routine 02 than anyother non-HDR data, for instance because detail differences, colourdifferences and edges are a lot stronger in I.

Please note that parallel to routine 02, there are other techniques thatcan take user input and adapt/refine the area of user input based on theimage data, such as the Smart Eraser tool in Photoshop®, IRP's describedin U.S. Pat. Nos. 7,031,547, 6,865,300, and 6,728,421; IRR's describedin “User Definable Image Reference Regions” U.S. application Ser. No.11/832,599, incorporated herein; and “Self-Adaptive Brush for DigitalImages” U.S. application Ser. No. 11/674,080, incorporated herein.

All of these adaptive routines will benefit in their selectivity if thereference image has a high differentiation of its details.

FIG. 4 further shows that the adapted data provided in U and theHDR-related data in C are merged to a matrix/matrices P. For instance,let us assume for now that the data in C contain a suggested luminosityadaptation factor, for instance so that:J _(xy) =i*C _(xy) *I _(xy)  [Equation 06]

would be a simple tone mapping, where i is any constant. This statessimply that multiplying the pixels in I with the (scalar) factors in Cyields in an adapted, tone-compressed version of J. The multiplicationsymbol “*” here refers to a scalar multiplication.

If for instance P=C+U, then we'd have:

$\begin{matrix}\begin{matrix}{J_{xy} = {i*\left( {C_{xy} + U_{{xy}\;}} \right)*I_{xy}}} \\{{\equiv J_{xy}} = {i*{f\left( {C_{xy},U_{{xy}\;}} \right)}*I_{xy}}} \\{{\equiv J_{xy}} = {i*P_{xy}*I_{xy}}}\end{matrix} & \left\lbrack {{equation}\mspace{14mu} 07} \right\rbrack\end{matrix}$

which means that P can be calculated by simply adding C and U, or inother words: the function ƒ is a simple addition. Note that more compleximplementations of ƒ are possible and will be discussed later. Note thatthe tone mapping is here just a multiplication of I with a value in P.Speaking in imaging terms, this means that through input Z the user canprovide (adapted) input to the system to further define where thebrightness adaptation of the tone mapping should be increased ordecreased to his or her desire.

Note that the effect of P need not be limited to brightness changesonly, P (respectively P₁, P₂ . . . ) can also represent otherparameter(s) of the tone mapping that are suitable to be separated fromthe process and stored in a matrix, the user may desire having influenceover, or affect the visual appearance of the result. The processdepicted in FIG. 4 is also shown in routine 03:

 10 Receive HDR image I, so that min(I) = 0.0 and max(I) = 1.0  20 Foreach pixel (x,y) in C do:  30 Set C(x,y) to a(I,x,y)  40 Reserve memoryfor U  50 Set Z to nil  60 set U = b(I,Z)  70 Reserve memory for P  80set P = f(C,U)  90 set J = t(I,P) 100 display J to user via a monitor110 receive Z from user 120 go to 60 [routine 03] where: I = HDR image C= pre-analysis of I a( ) = analytical function, for instance kernelconvolution Z = user input U = user input based matrix b( ) = functionto calculate U out of Z and I f( ) = function to merge U and C into P P= Parameter Matrix t( ) = function to calculate J out of P and I. J =output image

Note that I would typically be a 16 bit or 32 bit image. I can bederived from merging a variety of input images of different exposuresinto one image, or it can be simply a 8 bit, 12 bit or 16 bit imagecoming from a camera with a good dynamic range, which includes gooddigital cameras, scientific, or medical cameras.

The function α( ) can be a function that derives pre-calculated datafrom the HDR image I. For instance, if the herein disclosedimplementation is based upon the algorithm suggested by[Ash02],α_(xy,1)(I) can represent a suggested radius for each coordinatein I, or α_(xy,2)(I) can represent the value obtained by convolving I atthe coordinate (x,y) with a suitable kernel. Or, in a more general case,α_(xy)(I) can provide a suggested brightness-adjustment value derivedfrom the image I. Keep in mind that the luminosity component of all tonemapping routines can be brought to the form J_(xy)=C_(xy)*I_(xy), whereC_(xy) is a brightness adjustment factor for the luminosity.

b( ) is a function that calculates U out of Z and I in a suitablyfashion, and examples for how to do this were given in [routine 02] andin the section following routine 02.

ƒ( ) is a function that combines U and C into P. Imagine that if Prepresents radii for all x,y for a convolution kernel to be used for thetone mapping in t( ), then C could contain radii of a convolution kernelsuggested by an algorithm, and U could contain data where the user wouldwish a radius increase or decrease.

Terms as “brightness”, “contrast”, “halo-protection”, “detailsensitivity”, may be more user-friendly terms for internal parameters.

t( ) was already discussed, see equations 03, 04 and 05.

FIG. 5 represents in an abbreviated graphical form the desired HDRconversion details that the user may communicate to the disclosedsystem. As shown, there are general HDR conversion parameters that theuser may chose for the whole image, and there are local HDR conversionparameters provided to the system.

FIG. 6 displays a graphical user interface (“UI”) of a system using oneembodiment of the invention. As shown, it features brushes with whichthe user can influence the HDR conversion parameters.

Note that in the concept depicted in FIG. 6 the user has a radio buttonwhere he can select whether to edit the main tone mapping parameters orthe tone mapping parameters of a currently selected region. Depending onthe setting of that radio button the user can adjust the settings ofthat according area via the control sliders to the bottom right of theinterface. Additionally the user is offered to use brushes to increaseor decrease a certain effect.

Note that the selection line displays a region that the user hasselected, the boundaries of which could be stored in Z. Also note thatthere is a striped area around the selected region, indicating the areaof “image adaptation.” In other words, Z represents only the selectedregion, while U represents an area as large as the striped area and theselected region together.

It is a design choice whether the effect of the brushes is supposed tooverride the adjustments that the user has made within a region or viceversa. In this case, for better handling, editing of certain parametersvia brushes and editing of unrelated parameters via regions was allowed.

FIG. 7 displays different matrices. FIG. 7.1 represents a (un-mapped)HDR image, id est where no details were adapted to the dynamic range ofa computer screen or printer. FIG. 7.2 shows an image as it could resultfrom an HDR tone mapping process, and FIG. 7.3 shows such a tone-mappedimage where the user has taken some selective control over the tonemapping process. Here, the user has desired to keep the sky dark whilerendering the house bright. FIG. 7.4 represents two matrices as they mayoccur in C, FIG. 7.5 may represent the matrix U, and 7.6 may representthe matrix P.

As you can see, the user input represented in matrix U, FIG. 7.5, hasinfluenced the matrix P. Note that the white pixels in FIG. 7.5 mayrepresent “zero” or “nil” or “transparent”, depending on how thefunction ƒ is designed. Those skilled in the art may know that manymethods are possible to ensure that the areas in U where the user wishesto not influence the given results do not affect P. For instance, if ƒfollows the principle of P=C+U, then areas of no user influence can berepresented with zeros. If values in U are meant to overwrite C, then Ushould have transparency data (an “alpha channel”) ensuring that U doesnot overwrite C everywhere.

In general, any such tone mapping parameter that would in the end of theprocess be stored in P (P₁,P₂,. . .) could refer to, e.g., thebrightness of the resulting pixels in J, the contrast of the resultingpixels in J, the haloing strength in a region in J, the detail retentionin a region in J, a color temperature adjustment of resulting pixels inJ, a color brilliance adjustment of resulting pixels in J, a sharpnessof resulting pixels in J, or a number representing which tone mappingalgorithm is preferred in what area in J.

It will be evident to those skilled in the art that variousimplementations of Z, U and ƒ can be programmed that allow the user forinstance to increase or to decrease any such parameter in an imageregion, or it can be forced to a fixed value.

As an example for now, let us focus on brightness changes. If a systemis implemented as discussed in this disclosure, the user might initiallysee an image J as shown in FIG. 7.2. The user could then communicate tothe system using for instance a pointing device such parameters Z thatare suitable to communicate to the system that the user wishes a darkersky. Such a system could be for instance a brush engine, or an IRPsystem or an IRR system or a lasso-like selection or anything the like.Then this user input is converted into U, then U and C are merged intoP, and P is used to display a new version J of the image on the screen,as shown in FIG. 7.3, allowing the user to either accept the result orto refine it further.

Additional Embodiments

1—More Parameters

In another embodiment, the user may not only be allowed to takeinfluence over parameters that are necessarily required for tonemapping, but also other parameters such as color change, noisereduction, and unsharp mask sharpening, etc. If these parameters arealso stored in P, the suggested system (for instance as shown in FIG. 4)can allow for both a tone-mapping and other local adjustments in afashion where the user has influence over all important imageparameters, and where the user has the benefit that selection precisionis enhanced since the original HDR data can be used to automaticallyadapt user input to the image, for example, function b. If the HDRconversion function t that is supposed to be implemented does notprovide support for additional color or detail changing parameters, suchfunction can easily be constructed as t=t₁°t₂≡t₁(t₂) where either t₁ ort₂ is the original tone mapping and the other is an image changefunction supporting additional color and detail changes.

2—Manually Assisted Registration

In another embodiment, I may not be a perfectly merged HDR image. It iscommon to create HDR images out of a series of images with differentexposure, shot on a tripod. If this process was done poorly, or with abad tripod, or without a tripod, the resulting image may show pooroverlays in J. In such case the system provided herein may keep the HDRdata as a series of 8 bit or 16 bit images (the original images) andonly merge them by the time the function t is executed, overlaying themeither using a so-called image registration technique, or allowing theuser to overlay the images manually, or to first overlay the imagesusing an image registration technique and to further allow the user tofurther register the images himself. In any case, it may be advisable toallow the user to provide registration input via Z, so that somematrixes U_(n), U_(n+1) . . . may contain spatial offset informationused to adapt source images to one another to enhance the renderedimage.

FIG. 8 shows how a poor image registration might not match two details,leading to some sort of “double vision” effect in J. Here the user canplace two marks on the details to communicate to the system what objectsneed to be overlaid.

Note that the user may have difficulties in communicating to the systemwhich detail of which source image he is referring to. Therefore, thesystem may not receive information from the user which of the two marksrefers to which original image—which means that the two marks define therequired correction vector, but the signature of this vector will beunknown. In this case, the correction vector should be used that leadslocally to a better match, id est within a radius r≈10 . . . 30 pixels.

3—Manually Assisted Object Weights

In another embodiment, the scene may contain moving objects such aspeople or vehicles. If that is the case, the HDR data matrix I willcontain details that do not entirely match. In this case, there is abenefit from a system where I is kept as individual images I₁, I₂ . . .and where they are merged into one image later in the process, which iswhen t is applied. As will be known to one of ordinary skill in the art,it is possible to register images, even if they have differentbrightnesses, so that it such functionality can be added into t.

FIG. 9 illustrates a system where the user can take influence over imagedetails. If the user spots an object that moved or changed while theseries of images were being taken, the user may point in a system tothat object with his pointing device cursor (see FIG. 9, 9.1), and thesystem can then analyse which two or more images I_(n),I_(n+1) . . . outof the series of original images I₁,I₂ . . . contributed to the detailin this area. Then a second user interface area can be shown to the user(9.2) where the user can select which of the images I_(n),I_(n+1) . . .contains the optimal detail. Once the user has provided thisinformation, the system can allow the user to brush in the wanted detail(respectively: the “desired version” of a face/an object). Thisinformation can then be stored in U and be fed into function ƒ, so thatt can then render the final result, FIG. 9.3, based upon what detail theuser wanted at the given location.

In order to build a system that supports the feature named above, thesystem needs to be able to assign weights ω₁, ω₂, . . . to the pixels inI₁, I₂ . . . . It is known in the art to implement weights as a functionof the brightness of pixels in the images I₁,I₂ . . . , so that theextremely dark and bright pixels contribute less to the result. It wouldbe possible to enable the user to further influence these weights incertain areas, so that certain elements of an individual source imageI_(i) do not contribute to the final result. With relation to FIG. 9,the user would select a preferred “face version”, id est a preferred In,and then perform some brush strokes in the desired area. The algorithmwould then set ω_(n) for that area to 1.0 and all other ω to zero. Ofcourse, the system needs to ensure that no pixel exists that is assignedwith zero weights in all I₁,I₂ . . . .

An image response function can be calculated as a function of Zij. It isfeasible to calculate the image response function based upon only thoseZij the related weights of which were not influenced by the user. (Withrelation to FIG. 9, this means that the image response function iscalculated based on the pixels that the user has not applied a brushstroke to, id est all pixels that don't belong to the face). Theprecision of calculation of such an image response function will benefitif the user excludes pixels via weights ω₁, ω₂, . . . belonging toobjects that moved while the series of images was taken.

Note that the image response function can be calculated based on asubset of pixels of the image, and once the image response function iscalculated, a 32 bit HDR image can be constructed from all given pixelsand their assigned weights.

4—Maximizing the Image Area

Currently, it is common to create HDR shoots with a camera mounted ontoa steady tripod. However, since image registration is a widely knowntechnique in image processing, it is technically feasible to allow forHDR shooting without a tripod and with registering the imagesautomatically. Registration means to calculate offsets between imagesbased on their contents, so that images can be overlaid so that sameimage details match.

FIG. 10 shows a series of registered images. As can be seen, the userhas shaken the camera significantly between the shots. As it can also beseen, a cloud has moved while the series of images was taken. FIG. 10.4illustrates in its gray area the portion of pixels that can be kept.This is a considerably small area. FIG. 10.1 illustrates with numbers(1, 2, 3) how many pixels from I₁, I₂, I₃ are available to reconstructthe merged, tone-mapped image J at each location. If via the weightingsystem introduced above a HDR merging and tone mapping system isimplemented that is capable of processing input images I₁, I₂ . . . thatfeature weights ω_(n)=0 for certain pixels, the reconstructed image areacan be larger than the area covered by all three images by assigning aweight ω=0.0 to nonexistent pixels. Essentially, the input images arepadded so that they have the same dimensions after registration, and thepixels added during padding are assigned zero weight. As illustrated inFIG. 10.5, the image area may increase dramatically if the final imagecan now be reconstructed from the area where pixels from only two out ofthree images were available. Many routines exist that are capable ofregistering images that were not only shifted, but also rotated andenlarged (zoomed) in relation to one another, so that the system shownherein works also if the user has rotated or moved the camera betweenthe shoots or changed the zoom or moved his own position.

FIG. 11.1 shows what a result would look like without the padding andweighting system introduced herein, and FIG. 11.2 shows how the totalimage area can increase and how the cloud can benefit if said paddingand weighting system is implemented. It is possible to combine themanual weighting with area maximization. Note the oval marked “1” inillustration 10.1, indicating that the user has assigned a weight of 1.0to one of the images within that oval and weights of 0.0 to the otherimages, ensuring that no inferences of various clouds occur in theresult. This relates to the feature depicted in FIG. 9.

5—Original Data based Color Filters

In another embodiment, a color filter can be applied to the tone-mappedimage J that receives as an input the corresponding brightness in theoriginal scenario, id est in I. For instance, imagine an image takenwithin a room with low-temperature illumination of around 3000° K. Theimage also contains an outdoor scene seen through a window, illuminatedby 6800° K. While fixing this solely based on a tone-mapped image J ispossible using conventional adaptive color filters, it may be easier toapply a color correction filter to J as a function of values in I—id estbefore the tone mapping was applied. In other words: Color-correctingthose pixels in J that relate to dark pixels in I, as opposed tocolor-correcting the pixels that are dark in J.

In other words, even after the tone mapping was applied and the image Jis created, further image processing routines may benefit in theirselectivity if the values of I are provided as input parameters forcolor filters, sharpness filters, or selectivity filters.

As an almost equal alternative, pre-processing of the images I₁, I₂, . .. . is possible, which leads to the same effect. If the darkest image I₁contains colors mainly illuminated with 3000° K., and if the brightestimage I_(v) contains colors mainly illuminated with 6800° K., the colortemperature of all I_(ν), 1<=ν<=V, can be fixed as a function of ν.

Note that for optimal results this colour change in I₁, I₂, . . . ,I_(V) should take place after an image response function has beencalculated (to not introduce errors through the color correction), butbefore merging and tone-mapping the images I₁,I₂, . . . , I_(V) into J.

6—Saving I and Z to Disk

FIG. 12 illustrates a hard drive, a system memory, and a display device.It is illustrated that at the beginning of a retouching session of auser, there may be an “.exr” file on the hard drive which contains (byits very definition) HDR data, typically in 32 bit. Current systemsallow the user to either modify the HDR data and save it back, or totone-map the HDR data and save a JPG, TIFF or the like. In FIG. 12 it isillustrated that this invention disclosed herein allows for fastdisplaying of a tone-mapped image J on a screen to the user, whilereceiving refined tone-mapping related input from the user via Z, sothat a process can save back I, U, C, Z, etc. to a file, as illustrated.

If, for instance, the system would allow the user to save back I, C, U,and Z (C and U possibly in low resolutions), the user would be able toopen the file later, maybe even on a different computer, and see theedited on-screen-result J in fast time, while still working on theoriginal HDR data I.

Alternatively, it may be sufficient to store I and Z on the hard drive,since the invention disclosed herein allows for calculating firstresults of J on the screen very quickly. Alternatively, the system maystore I and Z, plus any of the matrices U, I, P at whatever resolutionthey were present in memory by the time of saving data to the harddrive, or any lower resolution of U, I, P may be stored for saving harddrive space.

All features disclosed in the specification, and all the steps in anymethod or process disclosed, may be combined in any combination, exceptcombinations where at least some of such features or steps are mutuallyexclusive. Each feature disclosed in the specification, including theclaims, abstract, and drawings, can be replaced by alternative featuresserving the same, equivalent or similar purpose, unless expressly statedotherwise. Thus, unless expressly stated otherwise, each featuredisclosed is one example only of a generic series of equivalent orsimilar features.

This invention is not limited to particular hardware described herein,and any hardware presently existing or developed in the future thatpermits processing of digital images using the method disclosed can beused, including for example, a digital camera system.

A computer readable medium is provided having contents for causing acomputer-based information handling system to perform the stepsdescribed herein.

The term memory block refers to any possible computer-related imagestorage structure known to those skilled in the art, including but notlimited to RAM, Processor Cache, Hard Drive, or combinations of those,including dynamic memory structures. Preferably, the methods andapplication program interface disclosed will be embodied in a computerprogram (not shown) either by coding in a high level language.

Any currently existing or future developed computer readable mediumsuitable for storing data can be used to store the programs embodyingthe afore-described interface, methods and algorithms, including, butnot limited to hard drives, floppy disks, digital tape, flash cards,compact discs, and DVD's. The computer readable medium can comprise morethan one device, such as two linked hard drives. This invention is notlimited to the particular hardware used herein, and any hardwarepresently existing or developed in the future that permits imageprocessing can be used.

Any currently existing or future developed computer readable mediumsuitable for storing data can be used, including, but not limited tohard drives, floppy disks, digital tape, flash cards, compact discs, andDVD'S. The computer readable medium can comprise more than one device,such as two linked hard drives, in communication with the processor.

1. A method of displaying a high dynamic range image, the methodcomprising: receiving the high dynamic range image; calculating a firstset of tone mapping parameters as a function of the high dynamic rangeimage; sub-sampling the first set of tone mapping parameters at a firstresolution to create a first sub-sampled parameter set; creating a firsttone-mapped image by processing the high dynamic range image as afunction of the first sub-sampled parameter set; and displaying thefirst tone-mapped image.
 2. The method of claim 1, further comprisingthe steps, after the display of the first tone-mapped image, of:sub-sampling the first set of tone mapping parameters at a secondresolution to create a second sub-sampled parameter set; creating asecond tone-mapped image by processing the high dynamic range image as afunction of the second sub-sampled parameter set; and displaying thesecond tone-mapped image.
 3. The method of claim 1, further comprisingthe step, prior to the sub-sampling step, of receiving a second set oftone mapping parameters from a user, and wherein the sub-sampling stepcomprises sub-sampling both the first and second sets of tone mappingparameters at the first resolution to create the first sub-sampledparameter set.
 4. The method of claim 3, where the second set ofparameters is selected from the group comprising a region selection andbrush stroke information.
 5. The method of claim 3, where the second setof parameters is selected from the group comprising image referencepoints and image reference regions.
 6. The method of claim 3, where thesecond set of parameters is selected from the group comprising colortemperature adjustments and local brightness change information.
 7. Themethod of claim 1, where the first set of parameters comprises a matrixof convolution radii.
 8. The method of claim 1, where the first set ofparameters comprises an adaptation light intensity matrix.
 9. The methodof claim 1, where the first set of parameters corresponds to a sub-setof the high dynamic range image.